package com.fr.report;

import java.io.Serializable;

public class ArrayPageSet extends PageSet
  implements Serializable
{
  private static final long serialVersionUID = 4854581123457224811L;
  private ReportPage[] page_array;
  private boolean serial;

  public ArrayPageSet(ReportPage[] paramArrayOfReportPage, boolean paramBoolean)
  {
    this.page_array = paramArrayOfReportPage;
    this.serial = paramBoolean;
  }

  public int size()
  {
    return ((this.page_array != null) ? this.page_array.length : 0);
  }

  public boolean sizePredictable()
  {
    return true;
  }

  public ReportPage getPage(int paramInt)
  {
    if ((paramInt < 0) || (paramInt >= size()))
      return null;
    ReportPage localReportPage = this.page_array[paramInt];
    if (this.serial)
    {
      localReportPage.getPageInfo().setTotalPages(size());
      localReportPage.setCurrentPageNumber(paramInt + 1);
    }
    return localReportPage;
  }
}